package com.xmy.cultivate.service.impl;

import com.xmy.cultivate.entity.BackData;
import com.xmy.cultivate.mapper.BackDataMapper;
import com.xmy.cultivate.service.IBackDataService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 需要回滚的sql 服务实现类
 * </p>
 *
 * @author min
 * @since 2022-11-28
 */
@Service
public class BackDataServiceImpl extends ServiceImpl<BackDataMapper, BackData> implements IBackDataService {

    @Autowired
    BackDataMapper backDataMapper;

    public boolean addForSql(String sql){
        Integer rs = backDataMapper.insertSql(sql);
        return true;
    }

    public Object selectSql(String sql){
        return backDataMapper.selectSql(sql);
    }

    public boolean updateSql(String sql){
        backDataMapper.updateSql(sql);
        return  true;
    }

    public boolean deleteSql(String sql){
        backDataMapper.deleteSql(sql);
        return true;
    }

}
